/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *如果数据库字段发生变化，请在代码生器重新生成此Model
 */
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VOL.Entity.SystemModels;

namespace VOL.Entity.DomainModels
{
    [Entity(TableCnName = "学生基本信息",TableName = "Student",DetailTable =  new Type[] { typeof(Stud_grade)},DetailTableCnName = "分数明细")]
    public class Student:BaseEntity
    {
        /// <summary>
       ///
       /// </summary>
       [Key]
       [Display(Name ="stud_id")]
       [Column(TypeName="int")]
       [Required(AllowEmptyStrings=false)]
       public int stud_id { get; set; }

       /// <summary>
       ///学生编号
       /// </summary>
       [Display(Name ="学生编号")]
       [MaxLength(20)]
       [Column(TypeName="nchar(20)")]
       [Editable(true)]
       public string no { get; set; }

       /// <summary>
       ///姓名
       /// </summary>
       [Display(Name ="姓名")]
       [MaxLength(20)]
       [Column(TypeName="nchar(20)")]
       [Editable(true)]
       public string name { get; set; }

       /// <summary>
       ///年龄
       /// </summary>
       [Display(Name ="年龄")]
       [Column(TypeName="int")]
       [Editable(true)]
       [Required(AllowEmptyStrings=false)]
       public int age { get; set; }

       /// <summary>
       ///班级
       /// </summary>
       [Display(Name ="班级")]
       [MaxLength(20)]
       [Column(TypeName="nchar(20)")]
       [Editable(true)]
       public string lever_class { get; set; }

       /// <summary>
       ///入学时间
       /// </summary>
       [Display(Name ="入学时间")]
       [Column(TypeName="datetime")]
       [Editable(true)]
       public DateTime? enterdatetime { get; set; }

       /// <summary>
       ///总分
       /// </summary>
       [Display(Name ="总分")]
       [Column(TypeName="int")]
       [Editable(true)]
       public int? add_all { get; set; }

       /// <summary>
       ///CreateID
       /// </summary>
       [Display(Name ="CreateID")]
       [Column(TypeName="int")]
       public int? CreateID { get; set; }

       /// <summary>
       ///Creator
       /// </summary>
       [Display(Name ="Creator")]
       [MaxLength(20)]
       [Column(TypeName="nchar(20)")]
       public string Creator { get; set; }

       /// <summary>
       ///CreateDate
       /// </summary>
       [Display(Name ="CreateDate")]
       [Column(TypeName="datetime")]
       public DateTime? CreateDate { get; set; }

       /// <summary>
       ///总附件
       /// </summary>
       [Display(Name ="总附件")]
       [Column(TypeName="nvarchar(max)")]
       [Editable(true)]
       public string z_fujian { get; set; }

       [Display(Name ="分数明细")]
       [ForeignKey("stud_id")]
       public List<Stud_grade> Stud_grade { get; set; }

    }
}